﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DBSubjectQuestionEdit.ascx.cs" Inherits="ExaminationSys.View.SystemManage.DBSubjectQuestionEdit" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script type="text/javascript" language="javascript">
    var setDBSubjectQuestionID = function (param) {
        try {

            var hidden = document.getElementById('<%=DBSubjectQuestionIDHidden.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
    var lock = function (param) {
        try {

            var hidden = document.getElementById('<%=LockHidden.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
    var serialNo = function (param) {
        try {

            var hidden = document.getElementById('<%=txtSerialNo.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
    var attachFile = function (param) {
        try {

            var hidden = document.getElementById('<%=txtAttachFile.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
    var subjectid = function (param) {
        try {

            var hidden = document.getElementById('<%=lblTitle2.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
</script>
<style type="text/css">
   .lbl{text-align:right;}
   .chk{ text-align:left; margin: 2px 0 0 10px;}
</style>

<input type="hidden" id="DBSubjectQuestionIDHidden" runat="server" />
<input type="hidden" id="LockHidden" value="0" runat="server" />
<input type="hidden" id="txtSerialNo" runat="server" />
<input type="hidden" id="txtAttachFile" runat="server" />
<input type="hidden" id="SubjectTitle" runat="server" />
<input type="hidden" id="lblTitle2" runat="server" />
<ext:Window 
    ID="DBSubjectQuestionEditWindow" 
    runat="server"
    Icon="Group" 
    Title="题库管理(大题--小题)编辑"
    MaxWidth="750" MinWidth="750"
    Height="510"
    AutoShow="false" 
    Modal="true" 
    Hidden="true"
    Layout="Fit">
    <Items> 
        <ext:FormPanel 
            ID="DBSubjectQuestionEditPanel" 
            runat="server" 
            Icon="ChartOrganisation"
            DefaultAnchor="95%"
            Padding="5" Title="大题标题"
            BodyPadding="10"
            MonitorPoll="500" 
            MonitorValid="true" 
            ButtonAlign="Center"
            Layout="Column">
            <Items>
                <ext:Panel ID="Panel1" runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form" LabelAlign="Top">
                    <Defaults>
                        <ext:Parameter Name="MsgTarget" Value="side" />
                    </Defaults>
                    <Items>
                        <ext:TextField ID="Knowledge" runat="server" FieldLabel="知识点" Cls="lbl" AnchorHorizontal="92%" />
                        <ext:TextField ID="KeyWord" runat="server" FieldLabel="关键字" Cls="lbl" AnchorHorizontal="92%" />                        
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel2455" runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form" LabelAlign="Top">
                    <Defaults>
                        <ext:Parameter Name="AllowBlank" Value="false" Mode="Raw" />
                        <ext:Parameter Name="MsgTarget" Value="side" />
                    </Defaults>
                    <Items>
                        <ext:ComboBox ID="QuestionType" runat="server" FieldLabel="类型" Cls="lbl" Editable="false" EmptyText="请选择类型">
                            <Items>
                                <ext:ListItem Value="单选" Text="单选"></ext:ListItem>
                                <ext:ListItem Value="多选" Text="多选"></ext:ListItem>
                            </Items>
                        </ext:ComboBox>
                        <ext:ComboBox ID="Challenge" runat="server" FieldLabel="难度" Cls="lbl" Editable="false" EmptyText="请选择难度">
                            <Items>
                                <ext:ListItem Value="高" Text="高"></ext:ListItem>
                                <ext:ListItem Value="中" Text="中"></ext:ListItem>
                                <ext:ListItem Value="低" Text="低"></ext:ListItem>
                            </Items>
                        </ext:ComboBox>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel26899" runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form" LabelAlign="Top">
                    <Defaults>
                        <ext:Parameter Name="AllowBlank" Value="false" Mode="Raw" />
                        <ext:Parameter Name="MsgTarget" Value="side" />
                    </Defaults>
                    <Items>
                        <ext:NumberField ID="Point" AllowBlank="false" runat="server" Name="Minutes" FieldLabel="分值" 
                                EmptyText="请输入分值" Text="0" 
                                Cls="lbl" IndicatorText="*参考用,阅卷将按比例统计得分" />
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel2" runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form" LabelAlign="Top">
                    <Defaults>
                       <%-- <ext:Parameter Name="AllowBlank" Value="false" Mode="Raw" />--%>
                        <ext:Parameter Name="MsgTarget" Value="side" />
                    </Defaults>
                    <Items>
                        <ext:ComboBox ID="SubjectType" runat="server" FieldLabel="题型" Cls="lbl" Editable="false" EmptyText="请选择题型">
                            <Items>
                                <ext:ListItem Value="阅读" Text="阅读" Index="0"></ext:ListItem>
                                <ext:ListItem Value="视听" Text="视听"></ext:ListItem>
                            </Items>
                        </ext:ComboBox>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel4" runat="server" Border="false" Header="false" ColumnWidth="1" Layout="Form" LabelAlign="Top">
                    <Items>
                        <ext:FileUploadField 
                            ID="AttachFile" 
                            runat="server" 
                            EmptyText="Select an File"
                            FieldLabel="附件" Cls="lbl"
                            ButtonText="浏览..."
                            IndicatorText="*视听题请上传多媒体文件"
                            Icon="Attach"
                            />
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel5" runat="server" Border="false" Header="false" ColumnWidth="1" Layout="Form" LabelAlign="Top">
                    <Defaults>
                        <ext:Parameter Name="AllowBlank" Value="false" Mode="Raw" />
                        <ext:Parameter Name="MsgTarget" Value="side" />
                    </Defaults>
                    <Items>
                        <ext:TextArea ID="Content" runat="server" BoxLabel="CheckBox"  FieldLabel="内容" Cls="lbl" />
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel7" runat="server" Border="false" Header="false" ColumnWidth=".95" Layout="Form">
                    <Items>
                        <ext:Panel 
                            ID="Panel8" runat="server" Border="false"
                            Layout="HBoxLayout" AnchorHorizontal="100%" Padding="5">
                            <LayoutConfig>
                                <ext:HBoxLayoutConfig Align="Middle" Pack="Start" />
                            </LayoutConfig>
                            <Items>
                                <ext:TextField ID="txtA" runat="server" FieldLabel="选项A  " Cls="lbl" 
                                     Flex="9" />
                                 <ext:Checkbox ID="chkA" runat="server" Width="15"></ext:Checkbox>
                                 <ext:Label ID="Label4" Text="正确" runat="server"></ext:Label> 
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel9" runat="server" Border="false" Header="false" ColumnWidth=".95"  Layout="Form">
                    <Items>
                        <ext:Panel 
                            ID="Panel10" runat="server" Border="false"
                            Layout="HBoxLayout" AnchorHorizontal="100%" Padding="5">
                            <LayoutConfig>
                                <ext:HBoxLayoutConfig Align="Middle" Pack="Start" />
                            </LayoutConfig>
                            <Items>
                                <ext:TextField ID="txtB" runat="server" FieldLabel="选项B  " Cls="lbl" 
                                     Flex="9" />
                                 <ext:Checkbox ID="chkB" runat="server" Width="15"></ext:Checkbox>
                                 <ext:Label ID="Label5" Text="正确" runat="server"></ext:Label> 
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel11" runat="server" Border="false" Header="false" ColumnWidth=".95" Layout="Form">
                    <Items>
                        <ext:Panel 
                            ID="Panel12" runat="server" Border="false"
                            Layout="HBoxLayout" AnchorHorizontal="100%" Padding="5">
                            <LayoutConfig>
                                <ext:HBoxLayoutConfig Align="Middle" Pack="Start" />
                            </LayoutConfig>
                            <Items>
                                <ext:TextField ID="txtC" runat="server" FieldLabel="选项C  " Cls="lbl" 
                                     Flex="9" />
                                 <ext:Checkbox ID="chkC" runat="server" Width="15"></ext:Checkbox>
                                 <ext:Label ID="Label3" Text="正确" runat="server"></ext:Label> 
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel13" runat="server" Border="false" Header="false" ColumnWidth=".95" Layout="Form">
                    <Items>
                        <ext:Panel 
                            ID="Panel14" runat="server" Border="false" Padding="5"
                            Layout="HBoxLayout" AnchorHorizontal="100%">
                            <LayoutConfig>
                                <ext:HBoxLayoutConfig Align="Middle" Pack="Start" />
                            </LayoutConfig>
                            <Items>
                                <ext:TextField ID="txtD" runat="server" FieldLabel="选项D  " Cls="lbl" 
                                     Flex="9" />
                                 <ext:Checkbox ID="chkD" runat="server" Width="15"></ext:Checkbox>
                                 <ext:Label ID="Label2" Text="正确" runat="server"></ext:Label> 
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>               
                <ext:Panel ID="Panel19" runat="server" Border="false" Header="false" ColumnWidth=".95" Layout="Form">
                    <Items>
                        <ext:Panel 
                            ID="Panel16" runat="server" Border="false"
                            Layout="HBoxLayout" AnchorHorizontal="100%" Padding="5">
                            <LayoutConfig>
                                <ext:HBoxLayoutConfig Align="Middle" Pack="Start" />
                            </LayoutConfig>
                            <Items>
                                <ext:TextField ID="txtE" runat="server" FieldLabel="选项E  " Cls="lbl" 
                                     Flex="9" />
                                 <ext:Checkbox ID="chkE" runat="server" Width="15"></ext:Checkbox>
                                 <ext:Label ID="Label1" Text="正确" runat="server"></ext:Label> 
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>               
                <ext:Panel ID="Panel3" runat="server" Border="false" Header="false" ColumnWidth=".95" Layout="Form">
                    <Items>
                        <ext:Panel 
                            ID="Panel6" runat="server" Border="false"
                            Layout="HBoxLayout" AnchorHorizontal="100%" Padding="5">
                            <LayoutConfig>
                                <ext:HBoxLayoutConfig Align="Middle" Pack="Start" />
                            </LayoutConfig>
                            <Items>
                                <ext:NumberField ID="txtOrderIndex" AllowBlank="false" runat="server" FieldLabel="排序位置 " 
                                EmptyText="1" Text="1" Cls="lbl" IndicatorText="*题目排序位置" />
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel15" runat="server" Border="false" Header="false" ColumnWidth="1" Margins="15 5 0 90"  Layout="Form">
                    <Items>
                        <ext:Panel 
                            ID="Panel22" runat="server" Border="false"
                            Layout="HBoxLayout" AnchorHorizontal="100%" BodyPadding="0">
                            <LayoutConfig>
                                <ext:HBoxLayoutConfig Align="Middle" Pack="Center" />
                            </LayoutConfig>
                            <Items>
                                <ext:Checkbox ID="chkLock" runat="server" Cls="lbl" ></ext:Checkbox> 
                                <ext:Label ID="kkjh" Text="锁定" runat="server" Margins="0 0 0 5"></ext:Label>   
                            </Items>
                        </ext:Panel>    
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel18" runat="server" Border="false" Header="false" ColumnWidth=".5" Hidden="true">
                    <Items>                        
                        <ext:TextField ID="txtIDA" runat="server" />
                        <ext:TextField ID="txtIDB" runat="server" />
                        <ext:TextField ID="txtIDC" runat="server" />
                        <ext:TextField ID="txtIDD" runat="server" />
                        <ext:TextField ID="txtIDE" runat="server" />
                        <ext:TextField ID="txtStage" runat="server" />
                    </Items>
                </ext:Panel>                
            </Items>
            <Buttons>                
                <ext:Button ID="SaveButton" runat="server" Text="保存" Icon="BulletGo">
                    <DirectEvents>
                        <Click OnEvent="SaveDBSubjectQuestion" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
                        </Click>
                    </DirectEvents>
                </ext:Button>
                <ext:Button ID="CancelButton" runat="server" Text="取消" Icon="Cancel">
                    <Listeners>
                         <Click Handler="#{DBSubjectQuestionEditWindow}.hide(null);" />
                    </Listeners>
                </ext:Button>
            </Buttons>
        </ext:FormPanel>      
    </Items>
</ext:Window>